HEX
Server: Apache
System: Linux clpupre 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64
User: undanet (1000)
PHP: 7.4.3
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /home/undanet/www/PortalEmpleo/src/Views/reports/call.php
<?php 
$root = get_site_url() . '/';
$conv = $data;
$data = [];
?> 
<div class="table-responsive" id="callreport">
<table class="table table-striped table-hover table-export table-export-call" id="call-table">
	<thead class="table-secondary input-container">
		<tr>
			<th scope="col">
			
				<span class="col-title"><?php echo __( 'Reference', 'panoramic_child' ); ?></span>
				<div class="input-group mb-3 input-group-large">
					<input type="text" name="reference-field" class="form-control text-filter-field" placeholder="<?php echo __( 'Reference', 'panoramic_child' ); ?>" aria-label="Reference" aria-describedby="basic-addon1">
					<span class="col_ordened col_0_order"></span>
				</div>
				
			</th>
			<th scope="col">
				<span class="col-title"><?php echo __( 'Description', 'panoramic_child' ); ?></span>
				<div class="input-group mb-3 input-group-large">
					<input type="text" name="description-field" class="form-control text-filter-field" placeholder="<?php echo __( 'Description', 'panoramic_child' ); ?>" aria-label="Description" aria-describedby="basic-addon1">
					<span class="col_ordened col_1_order"></span>
				</div>
			</th>
			<th scope="col">
				<span class="col-title"><?php echo __( 'Job', 'panoramic_child' ); ?></span>
				<div class="input-group mb-3">						 			
					<select class="selectpicker multiple-select-filter-field job-field" multiple name="job-field" data-live-search="true" title="<?php echo __('Select', 'panoramic_child')?>">
					<?php foreach(array_unique(array_column($conv, 'trabajo')) as $trabajo) {  ?>
						<option value="<?php echo strtolower($trabajo); ?>"><?php echo $trabajo; ?></option>
					<?php } ?>					
					</select>
					<span class="col_ordened col_2_order"></span>
				</div>
			</th>
			<th scope="col">
				<span class="col-title"><?php echo __( 'Start Date', 'panoramic_child' ); ?></span>
				<div class="input-group input-daterange mb-3">
					<input type="text" name="start-date-field" class="daterange-filter-field datarange-filter-exact" value="<?php echo getMinDate(array_column($conv, 'finicio')); ?> - <?php echo getMaxDate(array_column($conv, 'finicio')); ?>" />
					<input type="hidden" name="min-start-date-field" class="form-control min-start-date-field">
					<input type="hidden" name="max-start-date-field" class="form-control max-start-date-field">
					<span class="col_ordened col_3_order"></span>
				</div>
			</th>
			<th scope="col">
				<span class="col-title"><?php echo __( 'End Date', 'panoramic_child' ); ?></span>
				<div class="input-group input-daterange mb-3">
					<input type="text" name="end-date-field" class="daterange-filter-field datarange-filter-exact" value="<?php echo getMinDate(array_column($conv, 'ffin')); ?> - <?php echo getMaxDate(array_column($conv, 'ffin')); ?>" />
					<input type="hidden" name="min-end-date-field" class="form-control min-end-date-field">
					<input type="hidden" name="max-end-date-field" class="form-control max-end-date-field">
					<span class="col_ordened col_4_order"></span>
				</div>
			</th>
			<th scope="col" class="notexport col_5_order"><span class="col-title-not"><?php echo __( 'PDF General Bases', 'panoramic_child' ); ?></span></th>
			<th scope="col" class="notexport col_6_order"><span class="col-title-not"><?php echo __( 'PDF Specific Bases', 'panoramic_child' ); ?></span></th>
			<th scope="col" class="notexport col_7_order"><span class="col-title-not"><?php echo __( 'Record of Requirements', 'panoramic_child' ); ?></span></th>
			<th scope="col" class="notexport col_8_order"><span class="col-title-not"><?php echo __( 'Record of Examination', 'panoramic_child'); ?></span></th>
			<th scope="col" class="notexport col_9_order"><span class="col-title-not"><?php echo __( 'Record of Merits', 'panoramic_child' ); ?></span></th>
			<th scope="col" class="notexport col_10_order"><span class="col-title-not"><?php echo __( 'Requirements Assessments', 'panoramic_child' ); ?></span></th>
			<th scope="col" class="notexport col_11_order"><span class="col-title-not"><?php echo __( 'Examination notes', 'panoramic_child'); ?></span></th>
			<th scope="col" class="notexport col_12_order"><span class="col-title-not"><?php echo __( 'Merits Assessments', 'panoramic_child' ); ?></span></th>
			<th scope="col" class="notexport col_13_order"><span class="col-title-not"><?php echo __( 'Requirements resolution pdf', 'panoramic_child' ); ?></span></th>
			<th scope="col" class="notexport col_14_order"><span class="col-title-not"><?php echo __( 'Exam Resolution pdf', 'panoramic_child' ); ?></span></th>
			<th scope="col" class="notexport col_15_order"><span class="col-title-not"><?php echo __( 'End Resolution PDF', 'panoramic_child' ); ?></span></th>
			<th scope="col" class="notexport col_16_order"><span class="col-title-not"><?php echo __( 'Start Date strtotime Resolution PDF', 'panoramic_child' ); ?></span></th>
			<th scope="col" class="notexport col_17_order"><span class="col-title-not"><?php echo __( 'End Date strtotime', 'panoramic_child' ); ?></span></th>
		</tr>
	</thead> 
	<tbody>
		<?php foreach ($conv as $call) { 
			$convid = $call['id'];
		?>
			<tr class="tr-row">
				<td scope="row"><?php echo $call['referencia']; ?></td>
				<td scope="row"><?php echo $call['descripcion']; ?></td>
				<td scope="row"><?php echo $call['trabajo']; ?></td> 
				<td scope="row"><?php echo $call['finicio']->format('d/m/Y'); ?></td>
				<td scope="row"><?php echo $call['ffin']->format('d/m/Y'); ; ?></td>
				<td scope="row">
					<?php if (!empty($call['basesgenerales'])) { ?>
					<a href="<?php echo $root . 'descargaC/?ref=' . $call['referencia'] . '&file=' . basename($call['basesgenerales']) ?>" target="_blank">
						<?php echo __( 'Download', 'panoramic_child' ); ?>
					</a>
					<?php } else { ?>
						-
					<?php } ?>				
				</td>
				<td scope="row">
					<?php if (!empty($call['basesespecificas'])) { ?>
					<a href="<?php echo $root . 'descargaC/?ref=' . $call['referencia'] . '&file=' . basename($call['basesespecificas']) ?>" target="_blank">
						<?php echo __( 'Download', 'panoramic_child' ); ?>
					</a>
					<?php } else { ?>
						-
					<?php } ?>				
				</td>				
				<td scope="row">
					<?php if (todosAprobaronReq( $call['actas'] )) { ?>
						<a class="download-pdf-save" href="#" pdftype="acreq" callid="<?php echo $call['actas']['convocatoria']->getIdConvocatoria()?>" ><?php echo __('Download', 'panoramic_child'); ?></a>
					<?php } else { ?>
						-
					<?php } ?>						
				</td>
				<td scope="row">
					<?php if (todosAprobaronExa( $call['actas'] )) { ?>
						<a class="download-pdf-save" href="#" pdftype="acexa" callid="<?php echo $call['actas']['convocatoria']->getIdConvocatoria()?>" ><?php echo __('Download', 'panoramic_child'); ?></a>
					<?php } else { ?>
						-
					<?php } ?>						
				</td>
				<td scope="row">
					<?php if (todosAprobaronMer( $call['actas'] )) { ?>
						<a class="download-pdf-save" href="#" pdftype="acmer" callid="<?php echo $call['actas']['convocatoria']->getIdConvocatoria()?>" ><?php echo __('Download', 'panoramic_child'); ?></a>
					<?php } else { ?>
						-
					<?php } ?>						
				</td>
				<td scope="row">
					<?php if (todosAprobaronReq( $call['actas'] )) { ?>
						<a class="download-pdf-save" href="#" pdftype="vareq" callid="<?php echo $call['actas']['convocatoria']->getIdConvocatoria()?>" ><?php echo __('Download', 'panoramic_child'); ?></a>
					<?php } else { ?>
						-
					<?php } ?>						
				</td>
				<td scope="row">
					<?php if (todosAprobaronExa( $call['actas'] )) { ?>
						<a class="download-pdf-save" href="#" pdftype="vaexa" callid="<?php echo $call['actas']['convocatoria']->getIdConvocatoria()?>" ><?php echo __('Download', 'panoramic_child'); ?></a>
					<?php } else { ?>
						-
					<?php } ?>						
				</td>
				<td scope="row">
					<?php if (todosAprobaronMer( $call['actas'] )) { ?>
						<a class="download-pdf-save" href="#" pdftype="vamer" callid="<?php echo $call['actas']['convocatoria']->getIdConvocatoria()?>" ><?php echo __('Download', 'panoramic_child'); ?></a>
					<?php } else { ?>
						-
					<?php } ?>						
				</td>
				<td scope="row">
					<?php if (!empty($call['resolucionrequisitos'])) { ?>
					<a href="<?php echo $root . 'descargaC/?ref=' . $call['referencia'] . '&file=' . basename($call['resolucionrequisitos']) ?>" target="_blank">
						<?php echo __( 'Download', 'panoramic_child' ); ?>
					</a>
					<?php } else { ?>
						-
					<?php } ?>				
				</td>
				<td scope="row">
					<?php if (!empty($call['resolucionexamen'])) { ?>
					<a href="<?php echo $root . 'descargaC/?ref=' . $call['referencia'] . '&file=' . basename($call['resolucionexamen']) ?>" target="_blank">
						<?php echo __( 'Download', 'panoramic_child' ); ?>
					</a>
					<?php } else { ?>
						-
					<?php } ?>				
				</td>
				<td scope="row">
					<?php if (!empty($call['resolucionmeritos'])) { ?>
					<a href="<?php echo $root . 'descargaC/?ref=' . $call['referencia'] . '&file=' . basename($call['resolucionmeritos']) ?>" target="_blank">
						<?php echo __( 'Download', 'panoramic_child' ); ?>
					</a>
					<?php } else { ?>
						-
					<?php } ?>				
				</td>
				<td scope="row"><?php echo strtotime($call['finicio']->format('Y-m-d')) * 1000; ?></td>
				<td scope="row"><?php echo strtotime($call['ffin']->format('Y-m-d')) * 1000;  ?></td>
			</tr>
		<?php } ?>
	</tbody>
</table>
<script>
(function($) {
	$(document).ready(function () {
		var table = $('#call-table').DataTable({
			dom: 'Bfrtlip',
			initComplete: function(settings, json) {
				$('th.sorting').off();			
			  },					
			buttons: [{
				extend: "csv",
				charset: 'UTF-8',
				text: '<?php echo __( 'Export results to CSV file', 'panoramic_child' ); ?>',
				bom: true,
				filename: '<?php echo __( 'personal_information_candidates', 'panoramic_child' ); ?>',
				exportOptions: {
					format: {
						header: function (data) {
							return $('<span></span>').append(data).find('.col-title').text()
						}
					},   
					columns: ':visible:not(.notexport)'
				}
			}],
			columnDefs: [
				{ targets: [16, 17], visible: false },
			],
			language: {
				paginate: {
				  next: '<?php echo __( 'Next', 'panoramic_child' ); ?>', // &#8594; or '→'
				  previous: '<?php echo __( 'Previous', 'panoramic_child' ); ?>' //&#8592; or '←' 
				},
				'search':'<?php echo __( 'Search:', 'panoramic_child' ); ?>',
				"info":"<?php echo __( 'Showing', 'panoramic_child' ); ?> _START_ <?php echo __( 'to', 'panoramic_child' ); ?> _END_ <?php echo __( 'of', 'panoramic_child' ); ?> _TOTAL_ <?php echo __( 'entries', 'panoramic_child' ); ?>",
				"infoEmpty":"<?php echo __( 'Showing 0 to 0 of 0 entries', 'panoramic_child' ); ?>",
				"infoFiltered":"(<?php echo __( 'filtered', 'panoramic_child' ); ?> <?php echo __( 'from', 'panoramic_child' ); ?> _MAX_ total <?php echo __( 'entries', 'panoramic_child' ); ?>)",
				"zeroRecords":"<?php echo __( 'No matching records found', 'panoramic_child' ); ?>",
				"lengthMenu": "<?php echo __( 'Show', 'panoramic_child' ); ?> _MENU_ <?php echo __( 'entries', 'panoramic_child' ); ?>",
				"loadingRecords":"<?php echo __( 'Loading...', 'panoramic_child' ); ?>",
			  }			  
			  
		});
		
		table.order.listener( '.col_0_order', 0 );
		table.order.listener( '.col_1_order', 1 );
		table.order.listener( '.col_2_order', 2 );
		table.order.listener( '.col_3_order', 3 );
		table.order.listener( '.col_4_order', 4 );
		table.order.listener( '.col_5_order', 5 );
		table.order.listener( '.col_6_order', 6 );
		table.order.listener( '.col_7_order', 7 );
		table.order.listener( '.col_8_order', 8 );
		table.order.listener( '.col_9_order', 9 );
		table.order.listener( '.col_10_order', 10 );
		table.order.listener( '.col_11_order', 11 );
		table.order.listener( '.col_12_order', 12 );
		table.order.listener( '.col_13_order', 13 );
		table.order.listener( '.col_14_order', 14 );
		table.order.listener( '.col_15_order', 15 );
		table.order.listener( '.col_16_order', 16 );
		table.order.listener( '.col_17_order', 17 );
		 
		$('.input-container input[type="text"]').on('keyup', function() {
			table.draw();
		});
		
		$('.input-container .selectpicker').on('change', function() {
			table.draw();
		});		
		
		$('input[name="start-date-field"]').daterangepicker({
			opens: 'center' 
			}, function(start, end, label) {  
				var date1 = new Date(start);
				var startdate = date1.getTime();
				var date2 = new Date(end);
				var enddate = date2.getTime();                           
				$('.input-container input[name="min-start-date-field"]').val(startdate);	
				$('.input-container input[name="max-start-date-field"]').val(enddate);	
				table.draw();		
			});
		$('input[name="end-date-field"]').daterangepicker({
			opens: 'center' 
			}, function(start, end, label) {                         
				var date1 = new Date(start);
				var startdate = date1.getTime();
				var date2 = new Date(end);
				var enddate = date2.getTime(); 
				$('.input-container input[name="min-end-date-field"]').val(startdate);	
				$('.input-container input[name="max-end-date-field"]').val(enddate);	
				table.draw();		
			});
		});
	
	$.fn.dataTable.ext.search.push(function (settings, data, dataIndex) {
		let referencefield = $('.input-container input[name="reference-field"]').val().toLowerCase();
		let descriptionfield = $('.input-container input[name="description-field"]').val().toLowerCase();
		let jobfield = $('.input-container .selectpicker.job-field').val().join(' ').toLowerCase();
		let startdatefield = parseFloat(data[13]) || 0;
		let minstartdatefield = parseInt($('.input-container input[name="min-start-date-field"]').val(), 10);	
		let maxstartdatefield = parseInt($('.input-container input[name="max-start-date-field"]').val(), 10);			
		let enddatefield = parseFloat(data[14]) || 0; 
		let minenddatefield = parseInt($('.input-container input[name="min-end-date-field"]').val(), 10);	
		let maxenddatefield = parseInt($('.input-container input[name="max-end-date-field"]').val(), 10);	
		 
		if (data[0].toLowerCase().indexOf(referencefield) > -1 && 
			data[1].toLowerCase().indexOf(descriptionfield) > -1 && 
			(jobfield == '' || jobfield.indexOf(data[2].toLowerCase()) > -1) &&
			((isNaN(minstartdatefield) && isNaN(maxstartdatefield)) || 
				(isNaN(minstartdatefield) && startdatefield <= maxstartdatefield) ||
				(minstartdatefield <= startdatefield && isNaN(maxstartdatefield)) ||
				(minstartdatefield <= startdatefield && startdatefield <= maxstartdatefield)
			) && 
			((isNaN(minenddatefield) && isNaN(maxenddatefield)) || 
				(isNaN(minenddatefield) && enddatefield <= maxenddatefield) ||
				(minenddatefield <= enddatefield && isNaN(maxenddatefield)) ||
				(minenddatefield <= enddatefield && enddatefield <= maxenddatefield)
			) 
		) {
			return true;
		}
		
		return false;
	});		

})(jQuery); 

</script>
</div>